package com.naiterui.ehp.bs.emr.repository.mongo;

import java.util.List;

import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.naiterui.common.repository.core.BaseMongoRepository;
import com.naiterui.ehp.bs.emr.entity.mongo.MedicalRecordScreen;

/**
 * @author wangzehao
 * @date 2018/11/12 3:19 PM
 * @since 1.0.0
 */
@Repository
public interface MedicalRecordScreenRepository extends BaseMongoRepository<MedicalRecordScreen, String> {

    List<MedicalRecordScreen> findByDoctorIdAndPatientId(@Param("doctorId") Long doctorId, @Param("patientId") Long patientId);

    boolean existsByDoctorIdAndPatientIdAndRelation(@Param("doctorId") Long doctorId, @Param("patientId") Long patientId,
                                                    @Param("relation") Integer relation);
}
